package com.example.survey_determination.service.impl;

import com.example.survey_determination.dao.CarDamageInfoDao;
import com.example.survey_determination.service.CarDamageInfoService;
import entity.car_damage_info;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * (CarDamageInfo)表服务实现类
 *
 * @author makejava
 * @since 2022-01-10 23:59:13
 */
@Service("carDamageInfoService")
public class CarDamageInfoServiceImpl implements CarDamageInfoService {
    @Resource
    private CarDamageInfoDao carDamageInfoDao;

    /**
     * 通过ID查询单条数据
     *
     * @return 实例对象
     */
    @Override
    public car_damage_info queryById(String claimMainId) {
        return this.carDamageInfoDao.queryById(claimMainId);
    }

    @Override
    public car_damage_info selectAll() {
        return carDamageInfoDao.selectAll();
    }


    /**
     * 通过主键删除数据
     *
     * @param cardamageid 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Integer cardamageid) {
        return this.carDamageInfoDao.deleteById(cardamageid) > 0;
    }

    @Override
    public int insert(car_damage_info carDamageInfo) {
        return this.carDamageInfoDao.insert(carDamageInfo);
    }
}
